package com.supermarket.manage.provider.api.stocking;

import com.supermarket.manage.common.dto.PageBean;
import com.supermarket.manage.common.dto.stock.request.StockingPageParams;
import com.supermarket.manage.common.dto.stock.response.StockingDto;
import com.supermarket.manage.common.pojo.Stocking;

import java.util.List;

/**
 * @author Faxon
 * @version 1.0
 * @date 2020-03-17 16:57
 **/
public interface StockingService {
    /**
     * 条件分页查询盘点单
     *
     * @param params
     * @return
     */
    PageBean<Stocking> getStockingPageList(StockingPageParams params);

    /**
     * 根据id获取盘点单详情
     *
     * @param id
     * @return
     */
    StockingDto getStockingById(String id);

    /**
     * 根据id完成盘点单
     *
     * @param stocking
     * @return
     */
    Boolean doneStockingById(Stocking stocking);

    /**
     * 删除盘点单
     *
     * @param id
     * @return
     */
    Boolean deleteStockingById(String id);

    /**
     * 添加盘点单
     *
     * @param stocking
     * @return
     */
    Boolean addStocking(Stocking stocking);

    /**
     * 更新盘点单
     *
     * @param stocking
     * @return
     */
    Boolean updateStocking(Stocking stocking);

    /**
     * 添加盘点单并修正库存
     *
     * @param stocking
     * @return
     */
    Boolean addStockingAndUpdateStockingNumber(Stocking stocking);

    /**
     * 更新盘点单并修正库存
     *
     * @param stocking
     * @return
     */
    Boolean updateStockingAndUpdateStockingNumber(Stocking stocking);

    /**
     * 获取盘点单列表
     *
     * @param params
     * @return
     */
    List<Stocking> getStockingList(StockingPageParams params);
}
